package com.wangc.commons.service.impl;

import com.wangc.commons.service.RabbitMQService;
import org.springframework.amqp.AmqpException;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 *   @Author: WBJ.
 *   @Description: TODO
 *   @Date:Created in 2020/5/20 18:02.
 *   @Modified By:
 *  
 */
@Service
public class RabbitMQServiceImpl implements RabbitMQService {
    @Autowired
    RabbitTemplate rabbitTemplate;
    @Override
    public void convertAndSend(String exchange, String routingKey, Object object) throws AmqpException {
        rabbitTemplate.convertAndSend(exchange,routingKey,object);
    }
}
